/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

/**
 *
 * @author cesar
 */
public class PrincipalAlumno extends JFrame {

    public PrincipalAlumno(String cod, String perfil) {
        setSize(500, 350);
        setTitle("Sistema Academico");

        final PanelView pestana1 = new PanelView();
        final PanelView pestana2 = new PanelView();



        pestana1.set(new fmrAvanceCurricular_alum());



        final fmrMatricula matricula = new fmrMatricula();
        final fmrCursos cursos = new fmrCursos();
        final fmrCursosEquivalentes equivalentes = new fmrCursosEquivalentes();
        matricula.getIngresar().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                pestana2.set(cursos);
            }
        });
        cursos.getEquivalentes().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                pestana2.set(equivalentes);
            }
        });
        equivalentes.getElegir().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                pestana2.set(cursos);
            }
        });


        pestana2.set(matricula);





        JTabbedPane menu = new JTabbedPane();
        //menu.add(new FmrInicio(cod,perfil),"Inicio");
        menu.add(pestana1, "Avance Curricular");
        menu.add(pestana2, "Matricula");
        add(menu);

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        PrincipalAlumno m = new PrincipalAlumno("051-12901","1");
        m.setVisible(true);
    }
}
